/**
 * 感觉不如直接调库
 */

function cloneDeepDi(obj) {
  const newObj = {};
  let keys = Object.keys(obj);
  let key = null;
  let data = null;
  for (let i = 0; i < keys.length; i++) {
    key = keys[i];
    data = obj[key];
    if (data && typeof data === "object") {
      newObj[key] = cloneDeepDi(data);
    } else {
      newObj[key] = data;
    }
  }
  return newObj;
}
